package cn.portx.entity;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import javax.persistence.MappedSuperclass;

import com.bstek.bdf3.dorado.jpa.annotation.Generator;
import com.bstek.dorado.annotation.PropertyDef;

import cn.portx.policy.CreateUserPolicy;
import cn.portx.policy.CreatedDatePolicy;
import cn.portx.policy.IdGeneratorPolicy;

/**
 * 所有业务实体类的基类
 * 
 * @author louis
 * 
 */
@MappedSuperclass
@Inheritance(strategy = InheritanceType.TABLE_PER_CLASS)
public abstract class BaseEntity implements Serializable {

	private static final long serialVersionUID = 1L;

	@Id
	@Generator(policy = IdGeneratorPolicy.class)
	@Column(name = "ID_", length = 60)
	private String id;

	@Column(name = "CREATE_USER_", length = 60)
	@Generator(policy = CreateUserPolicy.class)
	@PropertyDef(label = "创建人")
	private String createUser;

	@Column(name = "CREATE_DATE_")
	@Generator(policy = CreatedDatePolicy.class)
	@PropertyDef(label = "创建日期")
	private Date createDate;

//	@Column(name = "UPDATE_USER_", length = 60)
//	@Generator(policy = UpdateUserPolicy.class)
//	@PropertyDef(label = "修改人")
//	private String updateUser;
//
//	@Column(name = "UPDATE_DATE_")
//	@Generator(policy = UpdateDatePolicy.class)
//	@PropertyDef(label = "修改日期")
//	private Date updateDate;

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getCreateUser() {
		return createUser;
	}

	public void setCreateUser(String createUser) {
		this.createUser = createUser;
	}

	public Date getCreateDate() {
		return createDate;
	}

	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}

}
